The present invention relates to a method making it possible for an object, which has opened up communication with another object, to be informed of accidental death of the other object. The invention is applicable to an object environment using Microsoft Corporation COM technology.
The present invention is particularly applicable to the field of systems for supervising industrial processes. Conventionally, such a system acquires data in real time from various supervised items of equipment, and it presents information relating to said equipment on one or more terminals. Among other constraints, it is essential for the displayed information to be pertinent so that the operator in charge of monitoring the industrial process is able to make a good diagnosis of the state of the process.
Thus, when a connection between an item of equipment and the supervisory system is interrupted as a result of any kind of failure, the system must inform the operator within as short a lapse of time as possible.
Certain recent supervisory systems implement object-oriented architectures suitable for being distributed over a plurality of execution units. FIG. 1 shows a typical architecture of a supervisory system. An item of equipment E is supervised by an object O1 placed in an execution unit U1 situated on the same site as the equipment. The object O1 communicates by means of a network with an object O2 placed in an execution unit U2 situated on a remote site and whose purpose is to perform processing, in particular to display information intended for an operator.
In order to help to develop such object-oriented and distributed applications, various tools exist that are referred to under the general abbreviation DPE (for Distributed Processing Environment). The aim of DPEs is to free the developer from managing the locating of objects in a distributed architecture and from managing communications between said objects.
Two large families of DPE exist: one is based on the OMG (Open Management Group) specification and is referred to as CORBA (Common Object Request Broker Architecture), and the other is built around the COM (Component Object Model) product designed by the Microsoft Corporation.
In its first version, COM managed the distribution of the objects over a set of processes situated on a single execution unit only (e.g. on a single computer). A second version, referred to as DCOM (Distributed Component Object Model) makes it possible to obtain a second level of distribution by managing the distribution of the objects within a plurality of execution units.
The present invention applies both to COM and to DCOM so that, in the remainder of the description, reference is made to the acronym COM only to cover both versions.
FIG. 2 shows the mechanism offered by COM for managing accidental death of an object. As explained below, that mechanism is insufficient in many cases.
Each time that a client object X opens up communication with a server object Y, it calls on a specific function offered by COM, referred to as xe2x80x9cAddRefxe2x80x9d, and whose purpose is to increment a counter associated with the server object Y. On normal ending of the communication, the client server Y calls on another function offered by COM, referred to as xe2x80x9cReleasexe2x80x9d, and whose purpose is to decrement the same counter. When the counter is equal to zero, that means that there is no longer any communication open to the server object Y; in other words, no client object requires the services of the server object Y. It is thus possible to release the resources occupied by the server object Y.
When the client object X dies accidentally, it can no longer call on the xe2x80x9cReleasexe2x80x9d function to decrement the counter associated with the server object. However, the COM infrastructure detects accidental death of the client object X and takes care of calling on the xe2x80x9cReleasexe2x80x9d function so as to guarantee that the value of the counter is pertinent.
For more information on the mechanisms specific to COM, reference may be made to the document entitled xe2x80x9cThe Component Object Model Specificationxe2x80x9d published by Microsoft Corporation. That document is available from Microsoft Corp., in particular on the Internet site whose address is as follows:
http://www.microsoft.com/oledev/olecom/title.html
Reference may also be made to the rather didactic document by Sara Williams and Charlie Kindel, xe2x80x9cThe Component Object Modelxe2x80x94The Foundation for OLE Servicesxe2x80x9d, published in Dr Dobb""s Special Report, winter 1994/95, vol. 14, No. 16, pages 14 to 22.
As mentioned above, that mechanism is insufficient because it does not enable the client object X to be informed of accidental death of the server object Y. In fact, the relationship between the objects is the opposite of what it needs to be.
In addition, when an object is in communication with a plurality of other objects, COM calling on the xe2x80x9cReleasexe2x80x9d function in the event of accidental death of one of the objects does not enable the object to know which of the other objects has accidentally died. The only information supplied is that one object among the set of server objects has just died.
As mentioned above, there is a problem in a supervisory system because the displayed information is no longer up to date, while the operator has not been informed that this is the case, but that insufficiency has repercussions on other technical fields, such as, for example, network management. Therefore, the invention is not to be understood as limiting itself to the field of industrial process supervision. On the contrary, the scope of the present invention is very general, and an aim of the present invention is to propose a method enabling any first object that has opened communication with a second object to be informed in the event of accidental death of said second object.
In the method of the invention:
said first object creates an intermediate object and sends a message containing a reference of said intermediate object to said second object; and
said second object calls on an xe2x80x9cAddRefxe2x80x9d method offered by COM, with a reference of said intermediate object (W) as a parameter;
if the second object incurs accidental death, COM calls on a xe2x80x9cReleasexe2x80x9d method for releasing said intermediate object, said intermediate object sends a message to said first object informing it of the accidental death of said second object.